package com.ruoyi.pollution.service.impl;

import java.util.Date;
import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pollution.mapper.BusPsBasMonitoringorganizationMapper;
import com.ruoyi.pollution.domain.BusPsBasMonitoringorganization;
import com.ruoyi.pollution.service.IBusPsBasMonitoringorganizationService;

/**
 * 监测机构信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-16
 */
@Service
public class BusPsBasMonitoringorganizationServiceImpl implements IBusPsBasMonitoringorganizationService 
{
    @Autowired
    private BusPsBasMonitoringorganizationMapper busPsBasMonitoringorganizationMapper;

    /**
     * 查询监测机构信息
     * 
     * @param id 监测机构信息主键
     * @return 监测机构信息
     */
    @Override
    public BusPsBasMonitoringorganization selectBusPsBasMonitoringorganizationById(String id)
    {
        return busPsBasMonitoringorganizationMapper.selectBusPsBasMonitoringorganizationById(id);
    }

    /**
     * 查询监测机构信息列表
     * 
     * @param busPsBasMonitoringorganization 监测机构信息
     * @return 监测机构信息
     */
    @Override
    public List<BusPsBasMonitoringorganization> selectBusPsBasMonitoringorganizationList(BusPsBasMonitoringorganization busPsBasMonitoringorganization)
    {
        return busPsBasMonitoringorganizationMapper.selectBusPsBasMonitoringorganizationList(busPsBasMonitoringorganization);
    }

    /**
     * 新增监测机构信息
     * 
     * @param busPsBasMonitoringorganization 监测机构信息
     * @return 结果
     */
    @Override
    public int insertBusPsBasMonitoringorganization(BusPsBasMonitoringorganization busPsBasMonitoringorganization)
    {
        busPsBasMonitoringorganization.setId(UUID.randomUUID().toString());
        busPsBasMonitoringorganization.setUpdatetime(new Date());
        return busPsBasMonitoringorganizationMapper.insertBusPsBasMonitoringorganization(busPsBasMonitoringorganization);
    }

    /**
     * 修改监测机构信息
     * 
     * @param busPsBasMonitoringorganization 监测机构信息
     * @return 结果
     */
    @Override
    public int updateBusPsBasMonitoringorganization(BusPsBasMonitoringorganization busPsBasMonitoringorganization)
    {
        busPsBasMonitoringorganization.setUpdatetime(new Date());
        return busPsBasMonitoringorganizationMapper.updateBusPsBasMonitoringorganization(busPsBasMonitoringorganization);
    }

    /**
     * 批量删除监测机构信息
     * 
     * @param ids 需要删除的监测机构信息主键
     * @return 结果
     */
    @Override
    public int deleteBusPsBasMonitoringorganizationByIds(String[] ids)
    {
        return busPsBasMonitoringorganizationMapper.deleteBusPsBasMonitoringorganizationByIds(ids);
    }

    /**
     * 删除监测机构信息信息
     * 
     * @param id 监测机构信息主键
     * @return 结果
     */
    @Override
    public int deleteBusPsBasMonitoringorganizationById(String id)
    {
        return busPsBasMonitoringorganizationMapper.deleteBusPsBasMonitoringorganizationById(id);
    }
}
